UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7ez/BrwP2WsGihetLZZfI+rH2zaT0mRM1RPhXv4fdNA='
WHERE
key_id = '088676d443ee8f52397f9d9b21c18f98a2a2f645d60a257252316b871f7a7370'
AND (
token = '7ez/BrwP2WsGihetLZZfI+rH2zaT0mRM1RPhXv4fdNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)