UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DWb/63U3Rnjk0qv4HBzj3ZLmXsYsfvla1HMPLw3qhHM='
WHERE
key_id = '410dd582b71bd9556e6f3ffa9fcaf7ae6173c819872579f11acd6c9d0a14b8bd'
AND (
token = 'DWb/63U3Rnjk0qv4HBzj3ZLmXsYsfvla1HMPLw3qhHM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)