UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LGXCU3DTD0O5Z3xGQXY1xvQ8t1q8t1pIfuKv2pjOBpg=' 
WHERE 
  key_id = 'e91775a5c66e417f9ad6055e80a0a3973496ae64d78cf59831ad190e483c6edd' 
  AND (
    token = 'LGXCU3DTD0O5Z3xGQXY1xvQ8t1q8t1pIfuKv2pjOBpg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047