UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pB2joC2emC0BPpAChUF6vPHG7jL8hcrY9fWTCR/F3sU=' 
WHERE 
  key_id = '88b68a291ae6afc83c37f2ee7030c2f2155a55d50cf245527c7d4d8392e77822' 
  AND (
    token = 'pB2joC2emC0BPpAChUF6vPHG7jL8hcrY9fWTCR/F3sU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035