UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/TTAb8tWJQy9t9guv3aw5PDULiZVFStdUNjCvPbXnNY='
WHERE
key_id = '07562a9d95a73ecf90165bbb049c8ec6daa4b77ff35414630cb5fcceae1c6d2c'
AND (
token = '/TTAb8tWJQy9t9guv3aw5PDULiZVFStdUNjCvPbXnNY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)