UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yNDGeSOQ87FDUldaiMfE9vbwnS8Kzm40jTUvK4qAbcg=' 
WHERE 
  key_id = '811941cba1ede941b57db8b15b0eec1119ed8324c4206870ab478d3c9ac5eaa9' 
  AND (
    token = 'yNDGeSOQ87FDUldaiMfE9vbwnS8Kzm40jTUvK4qAbcg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024