UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PuMViDlQhsaFdhGwJ1KZgxGVnMtG/bJqWvJ/8I0QmvI=' 
WHERE 
  key_id = '472abdc756058cb1d9b42cdd26dbf353ab710ca4fa3c6ef81714831d44a8708f' 
  AND (
    token = 'PuMViDlQhsaFdhGwJ1KZgxGVnMtG/bJqWvJ/8I0QmvI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033