UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TA7m4G5EkJdZR7l5SUIz7dICmbXe0TQ2J/80no5v2is='
WHERE
key_id = '888490b87817b90761d273962496e900398e15de340fc93489d8f05cc72702da'
AND (
token = 'TA7m4G5EkJdZR7l5SUIz7dICmbXe0TQ2J/80no5v2is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)