UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+qu5RermjZnMX/ecRNxZqaXzfBxDNBJA6V1TBykclhc='
WHERE
key_id = '75825cebd0ede0ff4341431eb75868ef66d4b1b43fab24a83001da43d19a8bd0'
AND (
token = '+qu5RermjZnMX/ecRNxZqaXzfBxDNBJA6V1TBykclhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)