UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WEnCGbznkmEwUSvMFLavm7nOPWMzI30iq/MCnBiZrBM='
WHERE
key_id = 'e08e61d4a57e61c5fff8238c4328d6bea9d2faba260ff13dd5c6cff3415bcf83'
AND (
token = 'WEnCGbznkmEwUSvMFLavm7nOPWMzI30iq/MCnBiZrBM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)