UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Se5iMoBKEu8Fi6MBAPn6/do1PgLz8ibYNsvKzdKlOsE=' 
WHERE 
  key_id = 'edf9a27cbb2411b0eb429be093e63e489f42ff7900e181b68da1160f79486b4a' 
  AND (
    token = 'Se5iMoBKEu8Fi6MBAPn6/do1PgLz8ibYNsvKzdKlOsE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037