UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jODh48KMR5LHQEpLzFmYVT1/Qqv+TR97BGZIGtB4Rz0=' 
WHERE 
  key_id = '3f172a9481fbcef7f9e5866f3a781506bfb4f5f03249001a17090bec8bcc608c' 
  AND (
    token = 'jODh48KMR5LHQEpLzFmYVT1/Qqv+TR97BGZIGtB4Rz0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028