UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xUuqHB/ocz1Fmxd/ZSfr0+t9ZKYSFWozBOEZjw4qavQ='
WHERE
key_id = '7bf03d0be9bc759c6d3065449e79138e3328d200fb844fe403f0c098e464f04d'
AND (
token = 'xUuqHB/ocz1Fmxd/ZSfr0+t9ZKYSFWozBOEZjw4qavQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)