UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4DgMiDigUPYy9mRzbUP4/9qfRxB1peyeOScwVfEWu1I='
WHERE
key_id = '1759423755cbc59a406a595182b399a1fbe2354afbf40311103bc17bab635416'
AND (
token = '4DgMiDigUPYy9mRzbUP4/9qfRxB1peyeOScwVfEWu1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)