UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6x+gYKfopD0mhFzhL/x4OUMburqAtTKqZoRi9TN487g=' 
WHERE 
  key_id = '92dd256ce1f5e1b63bcad27fff052bb7d876bf1e73feedd0d0261618f8b39ae6' 
  AND (
    token = '6x+gYKfopD0mhFzhL/x4OUMburqAtTKqZoRi9TN487g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060