UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cA8czC0lZIYANtr8ec60tXyiBo+H5vSvmHHINTrOp0U=' 
WHERE 
  key_id = '94a72a3f0c1b821e79c5e2563c0feee612266a04785858fc2ce39afb924ce2be' 
  AND (
    token = 'cA8czC0lZIYANtr8ec60tXyiBo+H5vSvmHHINTrOp0U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031