UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/rL1jwe8wNknksXA6gPXOsvpiutz4x+Xgr25YSRZcAk=' 
WHERE 
  key_id = '03757dd6bd5c5775efcba365d02ba706cd304971a1866fe6ea447b002cd6a4cc' 
  AND (
    token = '/rL1jwe8wNknksXA6gPXOsvpiutz4x+Xgr25YSRZcAk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00065