UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pms4qd7kQG7dWse6Nn+zrQ0RBCzNyT7yc8+xHYTQB9g=' 
WHERE 
  key_id = '80a872faeeef4352690464dd44ac4de45df0fba0cf1999bd05e0f1a9b4281682' 
  AND (
    token = 'pms4qd7kQG7dWse6Nn+zrQ0RBCzNyT7yc8+xHYTQB9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023