UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'onLjIRs4xq6dXBibJwKv0eLykD4rCu9tYEEiRmmKLSo='
WHERE
key_id = '14c6af23dc2fafab63e4709d7b33d77ed7de74ad11b36a71ffd3c7803938ff86'
AND (
token = 'onLjIRs4xq6dXBibJwKv0eLykD4rCu9tYEEiRmmKLSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)