UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLzdmkhIiQmEFkdHye6ZMJVv0bk48Y7R+xyTPG3fdUY='
WHERE
key_id = '0939066fed611e4a96288c9d730fd88fa27c09de4fb759994d64dd9eaebc5f7f'
AND (
token = 'jLzdmkhIiQmEFkdHye6ZMJVv0bk48Y7R+xyTPG3fdUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)