UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jm/BdZNLG3+zlR+0+HKw4iF/0VQjFhRcFuNckvtcj2s='
WHERE
key_id = '15a102de6c62464a1b86f39bb3ec6f171dfad3446f1374f15106e130eec30c2e'
AND (
token = 'Jm/BdZNLG3+zlR+0+HKw4iF/0VQjFhRcFuNckvtcj2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)