UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'l69XZmdf2gvaP9sdYdmCHPF8VxX3fTcEpVE6lC8sEJk=' 
WHERE 
  key_id = 'f7b1f2906e3be4a33e16bd841e244d9d8f035090f9b2ff02f58a2f705e314592' 
  AND (
    token = 'l69XZmdf2gvaP9sdYdmCHPF8VxX3fTcEpVE6lC8sEJk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032