UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wHnybY5KcHaqTpObZ++UNLmMsnfNxP6Fya5puzEyDXI='
WHERE
key_id = '87976157fec481b1cb5eb91806e326e35cff0c74ee390fe38a6ff67618de0574'
AND (
token = 'wHnybY5KcHaqTpObZ++UNLmMsnfNxP6Fya5puzEyDXI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)