UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OUgRcfdsWqHdqk0zqfd/UslSy32zvW27FhDFLszwDJY=' 
WHERE 
  key_id = 'f11cc8173a9d4f740647840829b8e9ed17f8840f3c39c41a3d0a509b8ccef831' 
  AND (
    token = 'OUgRcfdsWqHdqk0zqfd/UslSy32zvW27FhDFLszwDJY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041