UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pZozzeiiPblSZO+D8D5QlR/jXxu0RN0wdbRYYTjwo2U=' 
WHERE 
  key_id = 'dc1465d4320d5e3c7b2d1370734c3b6e594302d024f60c5fcc3df5b0b50e6a98' 
  AND (
    token = 'pZozzeiiPblSZO+D8D5QlR/jXxu0RN0wdbRYYTjwo2U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033