UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7v+4GG5pkojZY5/ImcBACTypRMDlt+97kl0GaVeXMhA='
WHERE
key_id = 'dade25b739c6ca1b0e909c8a9ca2b30b2022ead74b4d7c631a144f15a9608c9c'
AND (
token = '7v+4GG5pkojZY5/ImcBACTypRMDlt+97kl0GaVeXMhA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)