UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '75aIkoJCPzIkfreyfUAuC5vGGDhtWnyYmkyHQ0r55nI='
WHERE
key_id = '4cf6d8e2e446025ab5cbf682e9a7c2054ac1bd19190fcbc31f34f6a4476321d3'
AND (
token = '75aIkoJCPzIkfreyfUAuC5vGGDhtWnyYmkyHQ0r55nI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)