UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'g6Tjexw8UPLogUEcKs5jgoIlHLYMOvPZby0Dw8PwDbE='
WHERE
key_id = '3f03a083d578ebc4b8a8aecf8b8c9fee538e8737187efbd77de8db0a57e3dc09'
AND (
token = 'g6Tjexw8UPLogUEcKs5jgoIlHLYMOvPZby0Dw8PwDbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)