UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jarJxnOkeDdHnuP8FCKMKKM9I9LSYuGi0Vq8c9tn3yo=' 
WHERE 
  key_id = '83ad0078693843f60725699b29e25dd2d9d04c58aa3bef08bf24dbb4aa72b19e' 
  AND (
    token = 'jarJxnOkeDdHnuP8FCKMKKM9I9LSYuGi0Vq8c9tn3yo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046