UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+It3o0JUS3AtN1erOMMLHp/vnkXViG4EtGgemlFfSXo=' 
WHERE 
  key_id = 'c2cb6b730cde05af749dc3bdeff17fe729617ab12a63f1f28819f0b054e35064' 
  AND (
    token = '+It3o0JUS3AtN1erOMMLHp/vnkXViG4EtGgemlFfSXo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017