UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5N5s2AsoG70tAtR2a5DVz6GZGaOk5GOA98uo1VbnnMw=' 
WHERE 
  key_id = '554ad16f48ec1452a6fb52d61109643ee3a892622f83ee72b72e016eeea2e55a' 
  AND (
    token = '5N5s2AsoG70tAtR2a5DVz6GZGaOk5GOA98uo1VbnnMw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030