UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WBwVM3dmp1i68ML+TAGwPEP9E3PCr9TPkK66hlQGvKM='
WHERE
key_id = 'b44bda7f7b5f48768dd1cdf9918a9bb52af78b0f37f96638d8cb4c2c7ba4b3b8'
AND (
token = 'WBwVM3dmp1i68ML+TAGwPEP9E3PCr9TPkK66hlQGvKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)